package org.sucri.floxs.servlet;

import javax.servlet.http.HttpServletRequest;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * Created by IntelliJ IDEA.
 * User: Wen Yu
 * Date: Aug 30, 2007
 * Time: 8:37:30 PM
 * To change this template use File | Settings | File Templates.
 */
public class Servlet_Util
{
  public static Integer getPageID(HttpServletRequest req)
  {
    return doGetInteger(req, "page");
  }
  private static Integer doGetInteger(HttpServletRequest req, String key)
  {
    Integer page = null;
    try
    {
      page = new Integer(req.getParameter(key));
    }
    catch (Exception e) {}

    return page;
  }
  public static Date newDate(HttpServletRequest req, String key)
  {
    String date = req.getParameter(key);
    return new Date(123456676);
  }
  public static Timestamp newTimestamp(HttpServletRequest req, String key)
  {
    String date = req.getParameter(key);
    return new Timestamp(123456676);
  }
}
